﻿<UserControl x:Class="DIST.LR.ZHJG.Controls.Chart.ucPie"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:mscorlib="clr-namespace:System;assembly=mscorlib"
    xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
    xmlns:charting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"
    HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <UserControl.Resources>
        <Style x:Key="PieSeriesLabelStyle" TargetType="telerik:SeriesItemLabel">
            <Setter Property="FontFamily" Value="Arial Black"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="20"/>
        </Style>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <chart:RadChart x:Name="RadChart1" Background="Transparent"  BorderThickness="0">
            <chart:RadChart.DefaultView>
                <charting:ChartDefaultView ChartLegendPosition="Top">

                    <charting:ChartDefaultView.ChartLegend>
                        <charting:ChartLegend Name="ChartLegend" Background="Transparent" BorderThickness="0" LegendItemMarkerShape="Square" Header="图例" Visibility="Visible"/>
                    </charting:ChartDefaultView.ChartLegend>

                    <charting:ChartDefaultView.ChartArea>
                        <charting:ChartArea LabelFormatBehavior="None" LegendName="ChartLegend" SelectionChanged="ChartAreaSelectionChanged" NoDataString="请查询">
                        </charting:ChartArea>
                    </charting:ChartDefaultView.ChartArea>

                </charting:ChartDefaultView>
            </chart:RadChart.DefaultView>

            <!--<chart:RadChart.SeriesMappings>
                <charting:SeriesMapping >
                    <charting:SeriesMapping.SeriesDefinition>
                        <charting:PieSeriesDefinition  RadiusFactor="0.7" ItemLabelFormat="#XCAT #Y%">                            
                            <charting:PieSeriesDefinition.LabelSettings>
                                <charting:RadialLabelSettings LabelOffset="1.0" ShowConnectors="False" SpiderModeEnabled="False"/>
                            </charting:PieSeriesDefinition.LabelSettings>                            
                            <charting:PieSeriesDefinition.InteractivitySettings>
                                <charting:InteractivitySettings SelectionMode="Single" SelectionScope="Item" HoverScope="None" />
                            </charting:PieSeriesDefinition.InteractivitySettings>                            
                        </charting:PieSeriesDefinition>
                    </charting:SeriesMapping.SeriesDefinition>
                    <charting:ItemMapping DataPointMember="YValue" FieldName="Value" />
                    <charting:ItemMapping DataPointMember="XCategory" FieldName="Catagory" />
                    <charting:ItemMapping DataPointMember="LegendLabel" FieldName="Category"  />
                </charting:SeriesMapping>
            </chart:RadChart.SeriesMappings>-->
        </chart:RadChart>
    </Grid>
</UserControl>
